import Vue from 'vue'
import App from './App.vue'
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
import router from "./router";
import api from "./request/api";
import FullCalendar from 'vue-full-calendar'
import {preventReClick} from './preventReClick'

Vue.use(ViewUI);
Vue.use(FullCalendar)
Vue.use(preventReClick)
Vue.config.productionTip = false;
Vue.prototype.$api = api;

Vue.directive('noMoreClick', {
    inserted(el) {
        el.addEventListener('click', () => {
            el.classList.add('is-disabled');
            el.disabled = true;
            setTimeout(() => {
                el.disabled = false;
                el.classList.remove('is-disabled');
            }, 3000)
        })
    }
});

new Vue({
    router,
    render: h => h(App),
}).$mount('#app')
